package cn.itsource.org.pojo.domain;

import cn.itsource.basic.domain.BaseDomain;
import cn.itsource.basic.domain.CreatePassword;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Size;

@Data //生成get  set  hashcode equals toString方法
@AllArgsConstructor// 全参数构造
@NoArgsConstructor // 无参数构造
@Table(name = "t_employee") //指向表名
@ApiModel(description = "员工对象类")
public class Employee extends BaseDomain implements CreatePassword {

    //用户名
    private String username;
    //邮箱
    private String email;
    //手机号
    private String phone;
    //密码
    @Size(min = 3,max = 18,message = "请输入3-18位的密码")
    private String password;
    //盐值
    private String salt;
    //密码
    @Transient
    private String comfirmPassword;
    //年龄
    private Integer age;
    //状态 1正常 0 禁用
    private Integer state;
    //部门id
    private Long departmentId;
    //。。。。
    private Long logininfoId;
    //店铺id
    private Long shopId;
    //。。。
    private Long parentId;
    //。。。。
    private Long managerId;

    private String headImg;


    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }
}
